package com.basic.business.shift.domain;

import java.time.LocalTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.basic.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import com.basic.common.utils.StringUtils;
import com.basic.common.utils.uuid.ULID;

/**
 * 业务-班次管理对象 t_shift_mgmt
 * 
 * @author zhaoxy_jn@163.com
 * @date 2025-02-24
 */
@Getter
@Setter
@ExcelIgnoreUnannotated
public class TShiftMgmt extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private String id;

    /** 班次名称 */
    @ExcelProperty(value = "班次名称")
    private String shiftName;

    /** 班次开始时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @ExcelProperty(value = "班次开始时间")
    private LocalTime startTime;

    /** 班次结束时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @ExcelProperty(value = "班次结束时间")
    private LocalTime endTime;

    /** 状态 正常：NORMAL 删除：DELETED */
    @ExcelProperty(value = "状态 正常：NORMAL 删除：DELETED")
    private String shiftStatus;

    /** 序号 */
    @ExcelProperty(value = "序号")
    private Long shiftSort;

    public void setId(String id) {
        this.id = StringUtils.isNotEmpty(id) ? id : ULID.getId();
    }
}
